<?php

use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
use App\Http\Controllers\rootcontroller\usercontroller\UserController;
use App\Http\Controllers\rootcontroller\taskcontroller\TaskController;
use App\Http\Controllers\rootcontroller\friendcontroller\FriendController;
Route::prefix('root')->group(function () {
    Route::get('/user', function ()  {
        return Inertia::render('home/root/usermanage/Index');
    });
    Route::get('/task', function ()  {
        return Inertia::render('home/root/taskmanage/Index');
    });
    Route::get('/friend', function ()  {
        return Inertia::render('home/root/friendmanage/Index');
    });
});

Route::prefix('api/root')->group(function () {
    Route::get('/user/manage', [UserController::class, 'getAllUserDetails']);
    Route::post('/user/manage', [UserController::class, 'updateUserDetails']);
    Route::delete('/user/manage/{status}', [UserController::class, 'deleteUserDetails']);
    Route::get('/friend/manage', [FriendController::class, 'getAllFriendDetails']);
    Route::post('/friend/manage', [FriendController::class, 'editFriendDetails']);
    Route::delete('/friend/manage', [FriendController::class, 'deleteFriendDetails']);
});

Route::prefix('api/root')->group(function () {
    Route::get('/task/manage', [TaskController::class, 'getAllTaskDetails']);
    Route::post('/task/manage', [TaskController::class, 'updateTaskDetails']);
    Route::delete('/task/manage', [TaskController::class, 'deleteTaskDetails']);
});


